<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // break终止循环
      for (var i = 0; i < 10; i++) {
        if (i === 3) {
          break // 0,1,2
        }
        console.log(i)
      }

      // continue结束本次循环
      for (var n = 0; n < 10; n++) {
        if (n === 3) {
          continue // 0,1,4,5,6,7,8,9
        }
        console.log(n)
      }
    </script>
  </body>
</html>
